import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index'

// import Navigation from 'vue-navigation'
import MintUI from 'mint-ui'
import axios from 'axios'
import ECharts from 'echarts'
import $ from 'jquery'

// css
import 'normalize.css'
import 'mint-ui/lib/style.css'
import './assets/less/base.less'

// 公共组件
import CFilterBar from './components/filter_bar.vue'
import CLoadMore from './components/loadmore.vue'
import SectionTitle from './components/common/sectiontitle.vue'
import More from './components/common/more'
import RouterBack from './components/common/routerback'
import TabBar from './components/common/tab_bar.vue'
// fliter
require('./filter.js')

// 全局加载进度条
require('./assets/js/PACE/themes/yellow/pace-theme-minimal.css')
require('./assets/js/PACE/pace.min.js')
router.beforeEach((to, from, next) => {
  /* globals Pace */ // eslint 忽略
  Pace.restart()
  next()
})

Vue.component('c-filter-bar', CFilterBar)
Vue.component('c-load-more', CLoadMore)
Vue.component('c-more', More)
Vue.component('c-section-title', SectionTitle)
Vue.component('c-router-back', RouterBack)
Vue.component('c-tab-bar', TabBar)
Vue.use(MintUI.Lazyload)

Vue.use(MintUI)
Vue.prototype.$echarts = ECharts
Vue.prototype.$Toast = MintUI.Toast
Vue.prototype.$MessageBox = MintUI.MessageBox
Vue.prototype.$Indicator = MintUI.Indicator
Vue.prototype.$http = axios

Vue.config.productionTip = false

// jquery,lodash
window.$ = $
window._ = _

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
